{% extends '@nucleus/partials/particle.html.twig' %}

{% block particle %}
    {% set url = url(particle.url)|default(gantry.siteUrl()) %}
    {% if (url == gantry.siteUrl()) %}{% set rel='rel="home"' %}{% endif %}
    {% set class=(particle.class ? 'class="'~ particle.class ~'"') %}
    {% set image = url(particle.image) %}

    <a href="{{ url }}" title="{{ particle.text }}" {{ rel|default('')|raw }} {{ class|default('')|raw }}>
        {% if particle.svg is not empty %}
            {{ particle.svg|raw }}
        {% elseif image %}
            <img src="{{ url(particle.image) }}" alt="{{ particle.text }}" />
        {% else %}
            {{ particle.text|default('Logo') }}
        {% endif %}
    </a>
{% endblock %}
